function btnSubmit(param){
    if(param == "save"){
        var formdata = $("#infocconfig_frm_main").serializeObject();
        // console.log(formdata);
        server.req('wechat/teacher/update',formdata,function (e) {
            server.loadindex('page/teacher/teacherindex/teacherindex');
        },null,"POST");


    }else if(param == "cancel"){
        server.loadindex('page/teacher/teacherindex/teacherindex');
    }
};
//获取当前用户的大师资格申请
server.req('wechat/teacher/getByMemberId',{},function (e) {
    if(e.code==0){
        console.log(e);
        var data = e.data;
        if(e.data==null){
            console.log("你没通过专家审核");
        }
        else{
            if(data.status==2){
                server.loadData(".content-body",data);



            }else{
                console.log("你没通过专家审核");
            }
        }
    }
});

//点击上传文件
$(".uploadclass").change(function(e){
    $(this).upload({
        url:server.url+'/file/uploadFile',
        fileName:'file',

        onsuccess:function(r){
            $("#"+e.currentTarget.dataset.id).attr("src",r.data.url);
            $("#"+e.currentTarget.dataset.r).val(r.data.url);

        },

        onerror:function(e){
            console.log(e)
        },
        oncomplate:function(data){
            console.log(data);
        }
    });
});